<template>
	<view v-if="is_init">
		<uni-popup-input name="金额日志" @close="on_close">



			<uni-table border stripe type="selection" :type="'2'" @selection-change="selectionData"
				style="width: 100%;height: 100%;">

				<uni-tr>
					<uni-th align="center" width="30">id</uni-th>
					<uni-th align="center">uid</uni-th>
					<uni-th align="center">余额说明</uni-th>
					<uni-th align="center">余额（元）</uni-th>
					<uni-th align="center">关联日志id</uni-th>
					<uni-th align="center">当前用户余额（元）</uni-th>
					<uni-th align="center">时间</uni-th>
					<uni-th align="center">ip</uni-th>




				</uni-tr>

				<uni-tr v-for="(vo,index) in users_money_log" :key="index">
					<uni-td align="center" style="height: 120rpx;">{{vo.id}}</uni-td>
					<uni-td align="center">{{vo.uid}}</uni-td>
					<uni-td align="center">{{vo.text}}</uni-td>
					<uni-td align="center" style="color: #32CD32;" v-if="vo.state==0">-{{vo.number/100,2}}</uni-td>
					<uni-td align="center" style="color: red;" v-if="vo.state==1">+{{vo.number/100,2}}
					</uni-td>
					<uni-td align="center">{{vo.relation_id}}</uni-td>
					<uni-td align="center">{{vo.statistics_number/100,2}}</uni-td>
					<uni-td align="center">{{vo.time|getTime}}</uni-td>
					<uni-td align="center">{{vo.ip}}</uni-td>



				</uni-tr>
			</uni-table>
			<view class="p-20">
				<uni-pagination @change="getPage" show-icon="true" :total="total" current="1"
					style="float: left;margin-bottom: 10px;"></uni-pagination>
			</view>
		</uni-popup-input>

	</view>
</template>

<script>
	var find = {
		tel: '',
		account: '',
		nickname: '',
		face: '',
		face_type: 0,
		gender: 0,
		master_oen: 0,
		master_two: 0
	};
	export default {
		components: {},
		props: {},
		data() {
			return {
				find: {},
				is_init: false,
				nav_list: [],
				img_url: '',
				screenWidth: 0,
				users_money_log: [],
				last_page: 0,
				total: 0,
				uid: '',
				fromsData: {
					user_name: '',
					email: ''
				},
				page: 1
			}
		},
		methods: {
			change_gender(e) {
				this.find.gender = e.detail.value;
			},
			confirm_face(vals) {
				if (vals.length == 0) {
					this.find.face = ''
					return
				}
				this.find.face = vals[0]['attachment']
			},
			async init(uid) {
				document.documentElement.style.overflow = "hidden";
				var that = this;
				that.uid = uid

				let requestParams = {
					page: this.page,
					uid: this.uid
				};

				const ret = await this.Banmikeji.user_money_log(requestParams);
				this.users_money_log = ret.data.list.data;
				this.total = ret.data.list.total;
				this.is_init = true;


			},

			on_close() {

				document.documentElement.style.overflow = "scroll";
				this.find = {}
				this.is_init = false;
			},
			//js分类方法

		}
	}
</script>

<style>
	button::after {
		border: none;
	}

	.top_head {
		background-color: #F8F8F8;
		width: 100%;
		top: 0;
		left: 0;
		z-index: 999;
		position: sticky
	}

	.but {
		width: 120rpx;
		height: 100rpx;
		padding: 0;
		border: 0;
		background-color: transparent;
		outline: none;
	}
</style>